﻿/*
Copyright © 2010 François Karman

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

See <license.txt> for the complete license of the software.
*/

using System.Collections.Generic;
using System.Diagnostics;

namespace Faz.Dependencies
{
    /// <summary>
    /// Details about an assembly and its dependencies.
    /// </summary>
    [DebuggerDisplay("AssemblyOverview [FullName:{FullName}]")]
    public class AssemblyOverview
    {
        /// <summary>
        /// Initializes a new instance of the AssemblyOverview class.
        /// </summary>
        public AssemblyOverview()
        {
            this.Level = -1;
            this.Dependencies = new LinkedList<AssemblyOverview>();
        }

        /// <summary>
        /// Gets the dependencies of the assembly.
        /// </summary>
        public ICollection<AssemblyOverview> Dependencies { get; private set; }

        /// <summary>
        /// Gets or sets the level of the assembly.
        /// </summary>
        /// <value>
        /// <list type="table">
        /// <item>
        /// <term>0</term>
        /// <description>
        /// This assembly is not used as a dependency.
        /// </description>
        /// </item>
        /// <item>
        /// <term>1+</term>
        /// <description>
        /// This assembly is used as a dependency by superior levels assemblies,
        /// or same level in case of loops.
        /// </description>
        /// </item>
        /// </list>
        /// </value>
        public int Level { get; set; }

        /// <summary>
        /// Gets or sets the short name of the assembly.
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// Gets or sets the full name of the assembly.
        /// </summary>
        public string FullName { get; set; }

        /// <summary>
        /// Gets or sets the category of the assembly regarding the associated analysis.
        /// </summary>
        public Category Category { get; set; }
    }
}
